<div class="clearfix">
	<h1 class="pull-left"><?= $row["title"] ?></h1>
	<div class="pull-right">
		<div class="pull-left">
			<div class="note pull-right">
				<?= colorNote($row['note']) ?>
			</div>
		</div>
		<div class="pull-right">
			<form action="article.php?id=<?= $_GET['id'] ?>" method="post">
				<button class="note-pouce" type="submit" name="note" value="1">
				<span class="<?php if($row['pouce'] == 1) { echo 'note-green '; } ?>
				glyphicon glyphicon-thumbs-up" aria-hidden="true"></span>
				</button>
				<button class="note-pouce" type="submit" name="note" value="-1">
					<span class="<?php if($row['pouce'] == -1) { echo 'note-red '; } ?>
					glyphicon glyphicon-thumbs-down" aria-hidden="true"></span>
				</button>
			</form>
		</div>
	</div>
</div>
<div class="info-article clearfix">
	<span class="pull-left">Par <a href="<?= WEBROOT ?>user/user.php?id=<?= $row['autorID'] ?>"><?= $row["autor"] ?></a></span>
	<span class="pull-left type"><?= $row["type"] ?></span>
	<span class="pull-right date"><?= strftime("le %d %B %Y à %H:%M:%S",strtotime($row['date'])); ?></span>
</div>
<div id = "contentArticle">
	<div class="text-center">
<?php if(isset($row['link']) && $row['imgStatus'] != 3) { ?>
		<img src="<?= imgLink($row['link'])."?".time() ?>" class="thumbnail" height="300px"/>
<?php } else { ?>
		<img src="<?= imgLink("img/blockedImg.png") ?>" class="thumbnail" height="300px"/>
<?php }?>
	</div>
	<div class = "hseparator"></div>
	<br/>
	<div ><?= $row["content"] ?></div>
	<?php
	if(isset ($_SESSION['user_id']))
	{	
		if($_SESSION['user_id'] == $row['autorID'] || $user['roleID'] >= 2)
		{?>
			<div class = "hseparator"></div>
			<br/>
			<form method = "post" action = "article.php?id=<?= $_GET['id'] ?>" class="clearfix btn-publish">
				<a href = "#edit" onclick = "replace('edit', 'contentArticle', 'commsList')" class = "btn btn-primary btn-lg btn-left  pull-left half-size">Editer</a>
				<?php if ($row['statusID'] == 1 || $row['statusID'] == 0 && $user['roleID'] <= 1) { ?>
					<button type="submit" name="publish" value="reject" class="btn btn-danger btn-lg btn-right  pull-left half-size">Bloquer l'article</button>
				<?php }elseif ($row['statusID'] == 3 && $user['roleID'] >= 2) { ?>
					<button type="submit" name="publish" value="accept" class="btn btn-success btn-lg btn-right  pull-left half-size">Déloquer l'article</button>
				<?php } ?>
			</form>
<?php	}
		if($user['roleID'] >= 2 && $row['statusID'] == 0)
		{ ?>
			<br />
			<form method = "post" action = "article.php?id=<?= $_GET['id'] ?>" class="clearfix btn-publish">
				<button type = "submit" name = "publish" value = "accept" class = "btn btn-success btn-lg btn-left  pull-left half-size">Publier</button>
				<button type = "submit" name = "publish" value = "reject" class = "btn btn-danger btn-lg btn-right  pull-left half-size">Refuser</button>
			</form>
<?php	}
	}?>

</div>